The asl.library
What is the asl.library
The asl.library provides requesters for various purposes. Since
it is a part of the Workbench, everybody with a OS higher 2.0 is
able to use it without extra installation. On the other hand it
is style-conform, so it is the best to support it within your
programs. There also are other libraries providing similar functions
(arp.library or reqtools.library), but you should always use asl.
At least, there are patches to replace a asl-requester with another
one, so it really does not matter.
How to use it within Blitz
The first step is to allocate a Requester structure. We use the system call
AllocAslRequest_(type,taglist) (the underscore indicates a system function within
blitz) to receive a structure for our requester. This structure is a kind of
a plot which is needed to open up our requester. The type argument is
used to set the requester type, we want to get a structure for.
Valid values are :
#ASL_FileRequest a file requester (load/save/directory)
#ASL_FontRequest a font requester
#ASL_ScreenModeRequest a screenmode requester
The Function returns a Pointer to the mentioned structure if everything was
fine. If not so (not enough memory etc.) it will return a 0. It is important
to check it to avoid a guru. Next steps are a bit different for each requester
type :